package com.blb.order_service.config;

import com.blb.order_service.sdk.IWXPayDomain;
import com.blb.order_service.sdk.WXPayConfig;

import java.io.InputStream;

/**
 * 微信支付的配置
 */
public class MyWXPayConfig extends WXPayConfig {
    @Override
    public String getAppID() {
        //应用id
        return "wx632c8f211f8122c6";
    }

    @Override
    public String getMchID() {
        //商户id
        return "1497984412";
    }

    @Override
    public String getKey() {
        //秘钥
        return "sbNCm1JnevqI36LrEaxFwcaT0hkGxFnC";
    }

    @Override
    public InputStream getCertStream() {
        return null;
    }

    @Override
    public IWXPayDomain getWXPayDomain() {
        return new IWXPayDomain() {
            @Override
            public void report(String domain, long elapsedTimeMillis, Exception ex) {

            }

            @Override
            public DomainInfo getDomain(WXPayConfig config) {
                return new DomainInfo("api.mch.weixin.qq.com",true);
            }
        };
    }
}
